1. Field of the Invention
This invention relates to apparatus and methods for creating and managing point-in-time copies of data, and more specifically to apparatus and methods for efficiently performing “copy-on-write” operations on solid state drives.
2. Background of the Invention
Data snapshot technology is used with increasing prevalence to protect data and perform tasks such as data mining and cloning. Generally speaking, a “snapshot” is a point-in-time copy of data that reflects the state of the data at a specific moment in time. The increasing prevalence of snapshot technology is at least partly due to the benefits that snapshots provide. Among other benefits, snapshots may improve application availability, provide faster recovery, make it easier to manage backups of large volumes of data, reduce exposure to data loss, and reduce or eliminate the need for backup windows.
Currently, various approaches exist for implementing snapshots on storage devices. One approach for implementing a snapshot is to use a “copy-on-write” technique. Using such an approach, when a snapshot of a production volume is created, the snapshot is created instantly and no production data is actually copied from the production volume to the snapshot volume. As writes to blocks of the production volume are received, the original data in the blocks is copied from the production volume to the snapshot volume. This keeps the data in the snapshot consistent with the time the snapshot was created. Read requests to the snapshot volume for data blocks that are still not copied are redirected to the original volume, while read requests to data blocks that have been copied are directed to the snapshot volume. In this way, data is migrated from the production volume to the snapshot volume as writes to the production volume are received.
Unfortunately, the copy-on-write technique has disadvantages alongside the advantages it presents to users. For example, the copy-on-write technique typically requires multiple read/write operations (one read and two writes) for each application write I/O. That is, for each first write request received for a given data block on a production volume, original data must be read from the data block and written to the snapshot volume. Only then may new data associated with the write I/O request be written to the block of the production volume. This process consumes significant memory and bandwidth. The application write latency is also adversely impacted due to the multiple I/Os associated with the write request. This is because the application will only receive a write acknowledgement after all three I/Os are complete.
One additional disadvantage of the copy-on-write technique is manifest with newer high-speed storage media such as solid state drives (SSDs). Such SSDs are becoming more popular as back-end storage devices. However, such devices currently have limitations in terms of the number of write/erase cycles they can handle during their lifetimes. That is, the memory cells of the SSDs can only be overwritten a finite number of times. Since the conventional copy-on-write operation discussed above involves multiple writes to backend storage devices, the conventional copy-on-write operation undesirably reduces the effective life of SSDs.
In view of the foregoing, what are needed are apparatus and methods to more efficiency perform copy-on-write operations on SSDs. Ideally, such apparatus and methods will extend the effective lives of SSDs that store snapshot volumes.